const names = ["abc", "cba", "nba"];
const name = "frank";
const info = { name: "frank", age: 18 };

// 1. 函数调用时
function foo(x, y, z) {
  console.log(x, y, z);
}

// foo.apply(null, names)
foo(...names);
foo(...name);

// 2. 构造数组时
const newNames = [...names, ...name];
console.log(newNames);

// 3. 构建对象字面量ES2018(ES9)
const obj = { ...info, address: "石家庄市" };
console.log(obj);
